How to solve these coding challenges:


Challenge #1

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #2

Click to download a sample text file.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #3

Click to download a sample text file.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #4

Example: tail('sample_file.txt', 5) will return the last 5 lines from sample_file.txt.

Click to download a sample text file.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #5

Click to download a sample text file.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #6

Click to download a sample text file.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #7

The file format is as follows:

D:50

W:100

D means deposit while W means withdrawal.

Suppose that the following file is supplied to the program:

D:300

D:300

W:500

D:200

Then, the output should be: 300

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #8

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #9

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #10

Tip: See how to get a sorted view of a dictionary.

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #11

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #12

Are you stuck? Do you want to see the solution to this exercise? Click here.


Challenge #13

Are you stuck? Do you want to see the solution to this exercise? Click here.